package thread;

import java.io.File;

public class ThreadDemo03 {
    public static void main(String[] args) {
        Thread t1 = new myy();
        t1.start();


//        Runnable r1 = ()->{
//                for (int i = 0; i < 100; i++) {
//                    System.out.println("谁");
//                }
//        };
        Thread t2 = new Thread(()->{
            for (int i = 0; i < 100; i++) {
                System.out.println("谁");
            }
        });
        t2.start();
    }
}
class myy extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("我");
        }
    }
}
//class myym implements Runnable{
//    @Override
//    public void run() {
//        for (int i = 0; i < 100; i++) {
//            System.out.println("你");
//        }
//    }
//}
